package top.oneit.jdownload.service;

import javafx.stage.Stage;
import top.oneit.jdownload.JdownloadApplication;
import top.oneit.jdownload.data.dao.BaseDao;

/**
 * @author lingkang
 * Created by 2021/12/27
 */
public class BaseService extends BaseDao {
    /**
     * 获取对象,,注意返回空值
     */
    protected static <T> T getStage(Class<T> clazz) {
        Stage stage = JdownloadApplication.stages.get(clazz.getName());
        if (stage == null)
            return null;
        return (T) JdownloadApplication.stages.get(clazz.getName());
    }
}
